{% extends "report/common/search_run.html" %}
{% block report %}
{% if report_data %}
	<div class="reportSummary01">
		<ul>
			<li class="tagTab">
				Plan: <span>{{ report_data.plans|join:", " }}</span>
				<a href="{% url "testing-report" %}{{ request_path }}&report_type=per_plan_build_report" style="font-weight:normal; text-decoration:underline;">Per Plan View</a>
			</li>
		</ul>
		<ul>
			<li>
				Plan: <span>{{ report_data.plans_count }}</span>
				Run: <span>{{ report_data.runs_count }}</span>
			</li>
		</ul>
		<div class="clear"></div>
	</div>

	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="listTdReport">
		<tr>
			<th class="w350">Plan</th>
			<th class="w90">Builds</th>
			<th class="w90">Runs</th>
			<th>Case-Runs Passed</th>
			<th>Case-Runs Failed</th>
		</tr>
		{% for plan, builds_count, runs_count, status_subtotal in report_data.reports %}
		<tr>
			<td><a href="{% url 'test_plan_url_short' plan.pk %}">{{ plan.name }}</a></td>
			<td>{{ builds_count }}</td>
			<td>{{ runs_count }}</td>
			<td>{{ status_subtotal.PASSED|default:0 }}</td>
			<td>{{ status_subtotal.FAILED|default:0 }}</td>
		</tr>
		{% empty %}
		<tr><td colspan="5" align="center">No report data.</td></tr>
		{% endfor %}
	</table>
{% endif %}
{% endblock %}
